package com.blaze.framework.core.boot.properties;

import lombok.Getter;
import lombok.Setter;
import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.boot.context.properties.EnableConfigurationProperties;

/**
 * 异步线程池配置
 *
 * @author created by Zhou Zongbo on 2025/5/26.
 */
@Getter
@Setter
@ConfigurationProperties(prefix = "blaze.task.executor")
@EnableConfigurationProperties(ThreadPoolTaskExecutorProperties.class)
public class ThreadPoolTaskExecutorProperties {
    /**
     * 核心线程数
     */
    private int corePoolSize = 5;

    /**
     * 最新线程数
     */
    private int maxPoolSize = 10;

    /**
     * 线程存活时间秒
     */
    private int keepAliveSeconds = 60;

    /**
     * 队列容量
     */
    private int queueCapacity = 2000;

    /**
     * 线程名称前缀
     */
    private String threadNamePrefix = "blaze-executor-";
}
